package com.bjtu.transactionclient.controller;

import com.bjtu.transactionclient.api.api.JournalService;
import com.bjtu.transactionclient.api.vo.request.SyncJournalRequest;
import com.bjtu.transactionclient.base.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caiyuli
 * @date 2020/4/25 5:49 下午
 */

@RestController
@RequestMapping("/journal")
@Api(description = "关于journal的同步接口")
public class JournalController {

    @Autowired
    private JournalService journalService;

    @RequestMapping(value = "/sync-add", method = RequestMethod.POST)
    @ApiOperation("期刊同步接口")
    public Result queryUserIndexNoByIndex(@RequestBody @Validated SyncJournalRequest request){
        Result result = journalService.syncJournal(request);
        return result;
    }

}
